from alibi_detect.cd import MMDDrift

class DriftDetector:
    def __init__(self, reference_data):
        self.detector = MMDDrift(reference_data)

    def check_drift(self, new_data):
        """检测数据漂移"""
        return self.detector.predict(new_data)